import logging


class DLogger:

    def __init__(self, name):
        # create logger 
        self.logger = logging.getLogger(name)
        self.logger.setLevel(logging.DEBUG)
        # create file handler which logs even debug messages
        fh = logging.FileHandler('%s.log' % name)
        fh.setLevel(logging.DEBUG)
        fh.setFormatter(logging.Formatter('%(asctime)s - %(message)s'))
        ch = logging.StreamHandler()
        self.logger.addHandler(fh)
        self.logger.addHandler(ch)

    def info(self, *args):
        self.logger.info(*args)
